import request from '@/utils/request';
import {type info,type FindcategoryId,type Categoryinfo,type DeleteCategoryIds} from './type'

export function GetMaterialCategoryTree(){
    return request({
        url:'/MatericalCategoryData/GetMaterialCategoryTree',
        method:'get'
    })
}

export function InsertMaterialCategory(data:info){
    return request({
        url:'/MatericalCategoryData/InsertMaterialCategory',
        method:'post',
        data
    })
}

export function GetMaterialCategoryOne(data:any){
    return request({
        url:'/MatericalCategoryData/GetMaterialCategoryOne?categoryId='+data,
        method:'get',
        data
    })
}

export function UpdateMaterialCategoryOne(data:Categoryinfo){
    return request({
        url:'/MatericalCategoryData/UpdateMaterialCategoryOne',
        method:'post',
        data
    })
}

export function DeleteMaterialCategoryRange(data:any){
    return request({
        url:'/MatericalCategoryData/DeleteMaterialCategoryRange',
        method:'post',
        data
    })
}